/**
 * Copyright (c) 2009 blurredVision
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
 * associated documentation files (the "Software"), to deal in the Software without restriction, 
 * including without limitation the rights to use, copy, modify, merge, publish, distribute, 
 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or 
 * substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 
 * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT 
 * OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
#ifndef __GUI_ITEXTUREATLASUSER_H__
#define __GUI_ITEXTUREATLASUSER_H__

#pragma once

#include "geom/Vector.h"

namespace gui {

class Shell;
/**
 * \ingroup coreGUI
 * 
 * The ITextureAtlasUser interface.<br>
 * Enables a GUI element to be a user of the texture atlas defined in the Shell component.<br>
 * All elements can now share the same texture to display graphics. Every component can use a 
 * different subset of the shells texture atlas.
 *
 * \date 04-21-2007
 *
 * \author juckel
 *
 * \todo Insert comments
 * \todo Implement texture atlas functionality
 *
 */
class GUI_EXPORT ITextureAtlasUser
{
public:
	const math::Vector2i& getTexSubsetPosition() const;
	const math::Vector2i& getTexSubsetDimension() const;

	const math::Vector2i& getTexHighlightSubsetPosition() const;
	const math::Vector2i& getTexHighlightSubsetDimension() const;

	friend class Shell;

protected:
	ITextureAtlasUser(void);
	virtual ~ITextureAtlasUser(void);

	void setTexSubset(int x, int y, int w, int h);
	void setTexHighlightSubset(int x, int y, int w, int h);

	static math::Vector2i m_vTexPosition;
	static math::Vector2i m_vTexDimension;

	static math::Vector2i m_vTexHighlightPosition;
	static math::Vector2i m_vTexHighlightDimension;
};

} // namespace

#endif
